package bean;
/***********************************************************************
 * Module:  bookinfo.java
 * Author:  龙儿
 * Purpose: Defines the Class bookinfo
 ***********************************************************************/

import java.util.*;

/** @pdOid ef387f6f-65e5-467d-bbb4-4e1dd7cd2713 */
public class bookinfo {
   /** @pdOid e65e5901-18d5-446d-8b82-ce875ebaaba9 */
   public java.lang.String isbn;
   /** @pdOid 00d43766-3083-4649-b093-b19e90e99f07 */
   public java.lang.String bookname;
   /** @pdOid b52e846f-4cc4-4767-993e-6c71dc3921d4 */
   public java.lang.String writer;
   /** @pdOid d19a293f-1630-4c39-a693-38da5befdfa3 */
   public java.lang.String translator;
   /** @pdOid db0dae68-31ed-4f2d-ac7e-009439a46e7b */
   public java.lang.String publisher;
   /** @pdOid cc2a7c24-5e04-4d87-9265-2b8fedfb11e6 */
   public java.util.Date date;
   /** @pdOid 4780ed2d-aa9e-4544-9c94-a28789a6fea3 */
   public float price;
   
   /** @pdRoleInfo migr=no name=bookbrrow assc=reference2 coll=java.util.Collection impl=java.util.HashSet mult=0..* */
   public java.util.Collection<bookbrrow> bookbrrow;
   /** @pdRoleInfo migr=no name=booksubscribe assc=reference5 coll=java.util.Collection impl=java.util.HashSet mult=0..* type=Composition */
   public java.util.Collection<booksubscribe> booksubscribe;
   /** @pdRoleInfo migr=no name=storeinfo assc=reference6 coll=java.util.Collection impl=java.util.HashSet mult=0..* */
   public java.util.Collection<storeinfo> storeinfo;
   /** @pdRoleInfo migr=no name=booktype assc=reference1 mult=1..1 side=A */
   public booktype booktype;
   
   
   /** @pdGenerated default getter */
   public java.util.Collection<bookbrrow> getBookbrrow() {
      if (bookbrrow == null)
         bookbrrow = new java.util.HashSet<bookbrrow>();
      return bookbrrow;
   }
   
   /** @pdGenerated default iterator getter */
   public java.util.Iterator getIteratorBookbrrow() {
      if (bookbrrow == null)
         bookbrrow = new java.util.HashSet<bookbrrow>();
      return bookbrrow.iterator();
   }
   
   /** @pdGenerated default setter
     * @param newBookbrrow */
   public void setBookbrrow(java.util.Collection<bookbrrow> newBookbrrow) {
      removeAllBookbrrow();
      for (java.util.Iterator iter = newBookbrrow.iterator(); iter.hasNext();)
         addBookbrrow((bookbrrow)iter.next());
   }
   
   /** @pdGenerated default add
     * @param newBookbrrow */
   public void addBookbrrow(bookbrrow newBookbrrow) {
      if (newBookbrrow == null)
         return;
      if (this.bookbrrow == null)
         this.bookbrrow = new java.util.HashSet<bookbrrow>();
      if (!this.bookbrrow.contains(newBookbrrow))
      {
         this.bookbrrow.add(newBookbrrow);
         newBookbrrow.setBookinfo(this);      
      }
   }
   
   /** @pdGenerated default remove
     * @param oldBookbrrow */
   public void removeBookbrrow(bookbrrow oldBookbrrow) {
      if (oldBookbrrow == null)
         return;
      if (this.bookbrrow != null)
         if (this.bookbrrow.contains(oldBookbrrow))
         {
            this.bookbrrow.remove(oldBookbrrow);
            oldBookbrrow.setBookinfo((bookinfo)null);
         }
   }
   
   /** @pdGenerated default removeAll */
   public void removeAllBookbrrow() {
      if (bookbrrow != null)
      {
         bookbrrow oldBookbrrow;
         for (java.util.Iterator iter = getIteratorBookbrrow(); iter.hasNext();)
         {
            oldBookbrrow = (bookbrrow)iter.next();
            iter.remove();
            oldBookbrrow.setBookinfo((bookinfo)null);
         }
      }
   }
   /** @pdGenerated default getter */
   public java.util.Collection<booksubscribe> getBooksubscribe() {
      if (booksubscribe == null)
         booksubscribe = new java.util.HashSet<booksubscribe>();
      return booksubscribe;
   }
   
   /** @pdGenerated default iterator getter */
   public java.util.Iterator getIteratorBooksubscribe() {
      if (booksubscribe == null)
         booksubscribe = new java.util.HashSet<booksubscribe>();
      return booksubscribe.iterator();
   }
   
   /** @pdGenerated default setter
     * @param newBooksubscribe */
   public void setBooksubscribe(java.util.Collection<booksubscribe> newBooksubscribe) {
      removeAllBooksubscribe();
      for (java.util.Iterator iter = newBooksubscribe.iterator(); iter.hasNext();)
         addBooksubscribe((booksubscribe)iter.next());
   }
   
   /** @pdGenerated default add
     * @param newBooksubscribe */
   public void addBooksubscribe(booksubscribe newBooksubscribe) {
      if (newBooksubscribe == null)
         return;
      if (this.booksubscribe == null)
         this.booksubscribe = new java.util.HashSet<booksubscribe>();
      if (!this.booksubscribe.contains(newBooksubscribe))
      {
         this.booksubscribe.add(newBooksubscribe);
         newBooksubscribe.setBookinfo(this);      
      }
   }
   
   /** @pdGenerated default remove
     * @param oldBooksubscribe */
   public void removeBooksubscribe(booksubscribe oldBooksubscribe) {
      if (oldBooksubscribe == null)
         return;
      if (this.booksubscribe != null)
         if (this.booksubscribe.contains(oldBooksubscribe))
         {
            this.booksubscribe.remove(oldBooksubscribe);
            oldBooksubscribe.setBookinfo((bookinfo)null);
         }
   }
   
   /** @pdGenerated default removeAll */
   public void removeAllBooksubscribe() {
      if (booksubscribe != null)
      {
         booksubscribe oldBooksubscribe;
         for (java.util.Iterator iter = getIteratorBooksubscribe(); iter.hasNext();)
         {
            oldBooksubscribe = (booksubscribe)iter.next();
            iter.remove();
            oldBooksubscribe.setBookinfo((bookinfo)null);
         }
      }
   }
   /** @pdGenerated default getter */
   public java.util.Collection<storeinfo> getStoreinfo() {
      if (storeinfo == null)
         storeinfo = new java.util.HashSet<storeinfo>();
      return storeinfo;
   }
   
   /** @pdGenerated default iterator getter */
   public java.util.Iterator getIteratorStoreinfo() {
      if (storeinfo == null)
         storeinfo = new java.util.HashSet<storeinfo>();
      return storeinfo.iterator();
   }
   
   /** @pdGenerated default setter
     * @param newStoreinfo */
   public void setStoreinfo(java.util.Collection<storeinfo> newStoreinfo) {
      removeAllStoreinfo();
      for (java.util.Iterator iter = newStoreinfo.iterator(); iter.hasNext();)
         addStoreinfo((storeinfo)iter.next());
   }
   
   /** @pdGenerated default add
     * @param newStoreinfo */
   public void addStoreinfo(storeinfo newStoreinfo) {
      if (newStoreinfo == null)
         return;
      if (this.storeinfo == null)
         this.storeinfo = new java.util.HashSet<storeinfo>();
      if (!this.storeinfo.contains(newStoreinfo))
      {
         this.storeinfo.add(newStoreinfo);
         newStoreinfo.setBookinfo(this);      
      }
   }
   
   /** @pdGenerated default remove
     * @param oldStoreinfo */
   public void removeStoreinfo(storeinfo oldStoreinfo) {
      if (oldStoreinfo == null)
         return;
      if (this.storeinfo != null)
         if (this.storeinfo.contains(oldStoreinfo))
         {
            this.storeinfo.remove(oldStoreinfo);
            oldStoreinfo.setBookinfo((bookinfo)null);
         }
   }
   
   /** @pdGenerated default removeAll */
   public void removeAllStoreinfo() {
      if (storeinfo != null)
      {
         storeinfo oldStoreinfo;
         for (java.util.Iterator iter = getIteratorStoreinfo(); iter.hasNext();)
         {
            oldStoreinfo = (storeinfo)iter.next();
            iter.remove();
            oldStoreinfo.setBookinfo((bookinfo)null);
         }
      }
   }
   /** @pdGenerated default parent getter */
   public booktype getBooktype() {
      return booktype;
   }
   
   /** @pdGenerated default parent setter
     * @param newBooktype */
   public void setBooktype(booktype newBooktype) {
      if (this.booktype == null || !this.booktype.equals(newBooktype))
      {
         if (this.booktype != null)
         {
            booktype oldBooktype = this.booktype;
            this.booktype = null;
            oldBooktype.removeBookinfo(this);
         }
         if (newBooktype != null)
         {
            this.booktype = newBooktype;
            this.booktype.addBookinfo(this);
         }
      }
   }

}